﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace StateManager
{
    class BackgroundScreen : GenericScreenCode
    {
        // This screen only provides a background
        ContentManager content;

        Texture2D background;

        public override void LoadContent()
        {
            content = new ContentManager(SManager.Game.Services, "Content");

            background = content.Load<Texture2D>("images/background");
        }

        public override void UnloadContent()
        {
            content.Unload();
        }


        public override void Update(GameTime gameTime, bool setFocus, bool coveredByOtherScreen)
        {
            base.Update(gameTime, setFocus, false);
        }

        public override void Draw(GameTime gameTime)
        {

            Viewport view = SManager.GraphicsDevice.Viewport;
            Rectangle full = new Rectangle(0, 0, view.Width, view.Height);

            SManager.SpriteBatch.Begin();
            SManager.SpriteBatch.Draw(background, full, Color.White);
            SManager.SpriteBatch.End();
        }
    }
}
